package com.company.gas.mapper;

import com.company.gas.pojo.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

//mybatis的mapper类
@Mapper
@Repository
public interface CustomerMapper {
    List<Customer> selectAll();

    Customer queryCustomerById(@Param(value = "cusId") String cusId);

    int addCustomer(@Param(value = "cusId") String cusId, @Param(value = "cusName") String cusName,
                    @Param(value = "cusPhnum") String cusPhnum,
                    @Param(value = "cusAdr") String cusAdr,
                    @Param(value = "flag") Integer flag,
                    @Param(value = "createTime") Date createTime, @Param(value = "createBy") String createBy,
                    @Param(value = "modifyTime") Date modifyTime, @Param(value = "modifyBy") String modifyBy);

    int updateCustomer(@Param(value = "cusId") String cusId, @Param(value = "cusName") String cusName,
                       @Param(value = "cusPhnum") String cusPhnum,
                       @Param(value = "cusAdr") String cusAdr,
                       @Param(value = "flag") Integer flag,
                       @Param(value = "modifyTime") Date modifyTime, @Param(value = "modifyBy") String modifyBy);

    int deleteCustomer(@Param(value = "cusId") String cusId);
}
